home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19990725-20000114
/
000211_news@columbia.edu _Mon Oct 18 12:26:34 1999.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
4KB
Return-Path: <news@columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id MAA10960
for <kermit.misc@watsun.cc.columbia.edu>; Mon, 18 Oct 1999 12:26:34 -0400 (EDT)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id MAA13569
for kermit.misc@watsun.cc.columbia.edu; Mon, 18 Oct 1999 12:08:51 -0400 (EDT)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
Subject: Re: [Q] how to take an action on closing network connection OR redefine a command
From: Matt Swift <swift@alum.mit.edu>
Message-ID: <m21zas3b4l.fsf@aleph.swift.xxx>
Date: 18 Oct 1999 12:08:10 -0400
Organization: Shore.Net/Eco Software, Inc; (info@shore.net)
To: kermit.misc@columbia.edu
Thanks very much for your reply.
>>"F" == Frank da Cruz <fdc@watsun.cc.columbia.edu> writes:
F> As an aside, this would work very nicely in C-Kermit with:
F> pipe ssh <hostname>
F> except that the UNIX ssh client does not use standard i/o. Go figure.
F> (You can pipe rlogin, various telnet clients, cu, etc, but not ssh.)
F> (And of course we can't put ssh in Kermit itself due to licensing and
F> legal considerations.)
I have heard several places that OpenBSD is developing an open-source
ssh replacement, and I saw a link yesterday that called the project
"psst". Worth requesting the option for it to use stdio and thus work
with kermit's PIPE? Perhaps this would only encourage more people to
use RSA public key over the better soln of a kerberized IKSD -- but
Kerberos has its own problems with open-source status, and I think
kermit would gain popularity if it worked with psst.
F> You can't define a macro to supersede a built-in command. Imagine the
F> mischief you could cause if you could...
For someone like me who has worked for a decade with TeX, such
"mischief" is a standard way to get things done.
F> If you really want to execeute
F> a macro whose name is the same as built-in command, use "do", as in
F> "define close ..." and then "do close".
Aha, I thought there might have been something like this, and there it
is, staring me in the face on p. 216.
For the moment, I've gotten in the habit of all the time typing a
substitute for 'close' -- 'closet'.
assign closet close
def acslog {
spawn tunnel start acs
assign closet { run tunnel stop acs, close, assign closet { close }}
set host localhost:9002 /telnet
login
}
F> Before 7.0 is released, we might also be able to add an ON_CLOSE macro
F> capability, similar to the current ON_EXIT macro.
It seems to me that such a thing would be useful in more situations
than the one I described. It would make the macro additionally useful
if a variable were set indicating the cause of the close. Since there
only seem to be a small number of possible reasons for a close
('close', 'hangup', a remote disconnect, a lost connection, ...) this
seems not a big change to many parts of the code to set a flag. This
would permit, for instance, an ON_CLOSE macro to notify a user the
connection closed for an unexpected reason and to refrain from notice
if it was an expected reason.
F> Something like this maybe? (C-Kermit 7.0):
F> define isp {
F> run tunnel start isp
F> set host localhost:9000 /telnet
F> if fail end 1 Can't make connection
F> login
F> if fail end 1 Login failure
F> while ( > \v(ttyfd) -1 ) {
F> connect
F> }
F> shut
F> }
I tried something like this, and it works as expected, but it does not
permit me to move back and forth from the connection to the Kermit
command line. The first time you his ESC-c the connection is shut
down.